__import__('pkg_resources').declare_namespace(__name__)

from urldb.model.base import Base
from sqlalchemy.ext.declarative import declarative_base

DeclarativeBase = declarative_base(cls=Base)

class ModelIterator:
    def __iter__(self):
        for cls in DeclarativeBase.__subclasses__():
            yield cls

def init(options):
    for cls in ModelIterator():
        cls.set_schema(options.schema)
